package com.cloudbroker.openapi.manage.controller;

import com.cloudbroker.bcs.common.util.VOUtil;
import com.cloudbroker.bcs.platform.ltb.bizapi.service.dynamic.back.DynamicListBackVo;
import com.cloudbroker.bcs.platform.ltb.bizapi.service.dynamic.vo.DynamicQueryForm;
import com.cloudbroker.bcs.platform.ltb.bizapi.t2service.social.DynamicT2BizService;
import com.cloudbroker.bcs.platform.ltb.common.ext.annotation.SaveLog;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;

import static com.cloudbroker.bcs.platform.ltb.common.util.RequestUtil.getSingleParameterMapForBody;

/**
 * Created by zhaosh19213 on 2016/9/22.
 */
@Controller
public class DynamicController {

    @Resource
    private DynamicT2BizService dynamicT2BizService;

    /**
     * 用户注册
     * */
    @ResponseBody
    @RequestMapping("/dynamic_qry")
    @SaveLog(remark = "动态查询")
    public DynamicListBackVo funcQueryDynamic(HttpServletRequest request,String jsonpcallback) {
        DynamicQueryForm form = getSingleParameterMapForBody(request,DynamicQueryForm.class);
        return VOUtil.setJsonpResult(dynamicT2BizService.funcQueryDynamic(form),jsonpcallback);
    }

}
